import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    username:'222',
    usermenu: [],
  },
  mutations: {
    initUserInfo:(state,info)=>{
      state.username = info.username;
      state.usermenu = info.usermenu;
      console.log(info);
    }
  },
  actions: {
  },
  getters:{
    getUsername: state => state.username,
    getUsermenu: state => state.usermenu,
  },
  modules: {
  }
})
